#ifndef __DRV_TOUCH_H
#define __DRV_TOUCH_H

#include "board.h"
#include "touch_port.h"
#include "drv_touch_i2c_port.h"


#define TOUCH_EVENT_UP      (0x01)
#define TOUCH_EVENT_DOWN    (0x02)
#define TOUCH_EVENT_MOVE    (0x03)
#define TOUCH_EVENT_NONE    (0x80)
struct touch_message
{
    uint8_t          event;                 /* The touch event of the data */
    uint8_t          track_id;              /* Track id of point */
    uint16_t         x_coordinate;          /* Point of x coordinate */
    uint16_t         y_coordinate;          /* Point of y coordinate */
    uint32_t         timestamp;             /* The timestamp when the data was received */
};

int board_touch_read_status(struct touch_message *msg);

// void touch_get_xy(struct touch_message *msg);
// void touch_set_calibrate(uint32_t x_min,uint32_t x_max,uint32_t y_min,uint32_t y_max);
// void touch_set_screen(uint32_t x,uint32_t y,uint32_t dir);
// int touch_get_raw(uint32_t *raw_x,uint32_t *raw_y);
// void touch_raw_to_xy(uint32_t raw_x,uint32_t raw_y,uint32_t *x,uint32_t *y);
// int touch_isr_callback_set(void(*callback)(int));

int drv_touch_init(void);
#endif
